import 'package:base_lib/common/widget/peach_button.dart';
import 'package:base_lib/index.dart';
import 'package:doctor_login_lib/component.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/src/widgets/framework.dart';
import 'package:fsuper/fsuper.dart';
import 'package:doctor_login_lib/login/entity/doctor_review_status_entity.dart'
    as ReviewBean;

class RejectAuditPage extends BaseThemeWidget {
  final Parameters parameters;

  RejectAuditPage(this.parameters);

  @override
  Widget buildChild(BuildContext context, MTheme theme) {
    ReviewBean.Data doctor = parameters.getObj("doctor");

    return Scaffold(
      appBar: AppBar(
        leading: BackButton(
          onPressed: () {
            Routers.pop(context);
          },
        ),
        centerTitle: true,
        title: Text("审核不通过"),
      ),
      body: Container(
        height: double.infinity,
        alignment: Alignment.center,
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.center,
          children: [
            Spacer(),
            Image.asset(
              "images/rejectAudit.png",
              height: ScreenAdapter.screenHeightDp / 4,
              package: DoctorLoginComponent.AssetsPackageName,
            ),
            SizedBox.fromSize(
              size: Size(0, 20),
            ),
            Text(
              "实名认证审核不通过",
              style: TextStyle(fontSize: theme.themeFontSize.fontSizeNormal),
            ),
            Text(
              "${doctor.refuseReason}",
              style: TextStyle(fontSize: theme.themeFontSize.fontSizeNormal),
            ),
            SizedBox.fromSize(
              size: Size(0, 20),
            ),
            Padding(
              padding: const EdgeInsets.only(top: 30.0),
              child: peachButtonBuilder(
                onTap: () {
                  Routers.navigateTo(
                      context, DoctorLoginComponent.setDoctorInfoPage);
                },
                text: '修改实名认证信息',
              ),
            ),
            SizedBox.fromSize(
              size: Size(0, 20),
            ),
            Spacer(),
          ],
        ),
      ),
    );
  }
}
